package com.aramis.mydytt.ui.base

import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView

/**
 * Description: BaseViewHolder
 * @author lizhidan
 * Created: 2021/5/24
 */
abstract class BaseViewHolder<M>(parent: ViewGroup, layoutId: Int) :
    RecyclerView.ViewHolder(LayoutInflater.from(parent.context).inflate(layoutId, parent, false)) {

    fun <T> findView(id: Int): T {
        return itemView.findViewById(id)
    }

    abstract fun bind(m: M, position: Int)
}